package question7.test3;

import java.util.ArrayList;
import java.util.Date;

public class ArrayDemo {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        int i=10000000;
        Date date1=new Date();
        long begin=System.currentTimeMillis();
        for (int i1 = 0; i1 < i; i1++) {
            list.add(i1);
        }
        Date date2=new Date();
        long end=System.currentTimeMillis();
        long l=date2.getTime()-date1.getTime();
        System.out.println(l+"微秒");
        System.out.println(end-begin+"微秒");
    }
}
